package com.wwy.consumer;
import com.wwy.config.RabbitMqUtils;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.boot.SpringBootVersion;
import org.springframework.core.SpringVersion;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;


/**
 * @author 王伟羽
 * @date 2024/3/13 10:33
 */
@Component
public class ConsumerTest {

    private final static String QUERE_NAME = "quere_name";


   @RabbitListener(queues = QUERE_NAME)
   public void handleMessage(String msg) {
       System.out.println("listener 收到消息4 " + msg);
   }

    public static void main(String[] args) {
        System.out.println("Spring Boot Version: " + SpringBootVersion.getVersion());
        System.out.println("Spring Version: " + SpringVersion.getVersion());
    }
}
